package com.itheima.demo;

//步骤1：定义一个电影类，以便创建电影对象，封装电影信息
public class Movie {

    private int id;
    private String name;
    private double price;

    //若存在有参构造器，则无参构造器需要手动写出
    public Movie() {
    }

    //定义有参构造器，方便创建对象
    public Movie(int id, String name, double price) {
        this.id = id;
        this.name = name;
        this.price = price;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
